package utils;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;

public class DBUtil {
    private static String url = "jdbc:mysql://localhost:3306/work";
    private static String user = "root";
    private static String password = "123456";
    public static Connection getConn() throws SQLException {

        try {
            Class.forName("com.mysql.cj.jdbc.Driver");
            return DriverManager.getConnection(url, user, password );
        } catch (ClassNotFoundException e) {
            throw new RuntimeException(e);
        }

    }

}
